

package jetbrains.buildServer.server.rest.jersey.provider.annotated;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Marks Spring component to be also part of Jersey context.
 * <br/>
 * This annotation enables Jersey endpoints (@Path) to inject the beans from Spring's context via @Context annotation.
 * <br/>
 * Use this annotation alon with Spring's @Component instead of writing Jersey @Provider.
 * <p/>
 * This annotation should be applied only to components with SINGLETON scope.
 * If applied to REQUEST/PROTOTYPE/etc. then undefined behaviour.
 */
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface JerseyInjectable {
}